import request from '@/utils/request'
import { getToken } from '@/utils/token'

export function getProjectListApi(pageSize,page) {
  return request({
    method:'GET',
    url:'project/getProjectList',
    params:{pageSize,page},
    headers:{
      'Access-Token':getToken()
    }
  })
}


// 新增项目
export function insertProject(project) {
  return request({
    method:'POST',
    url:'project/createProject',
    data:project,
    headers:{
      'Access-Token':getToken()
    }
  })
}


// 修改项目

export function modifyProject(project) {
  return request({
    method:'POST',
    url:'project/modifyProject',
    data:project,
    headers:{
      'Access-Token':getToken()
    }
  })
}



// 删除项目
export function deleteProjects(ids) {
  return request({
    method:'POST',
    url:'project/deleteProjects',
    data:ids,
    headers:{
      'Access-Token':getToken()
    }
  })
}


// 查询项目
export function searchProject(keyword) {
  return request({
    method:'GET',
    url:'project/searchProject',
    params:{keyword},
    headers:{
      'Access-Token':getToken()
    }
  })
}


// 获取全部项目信息
export function getProjectListAll() {
  return request({
    method:'GET',
    url:'project/getProjectListAll',
    headers:{
      'Access-Token':getToken()
    }
  })
}
